#!/bin/bash
apt-get install apache2-mpm-worker
apt-get install libapache2-mod-fastcgi php5-fpm php5
a2enmod actions fastcgi alias
touch /usr/lib/cgi-bin/php5-fcgi
cat > /etc/apache2/conf-enabled/php5-fpm.conf <<EOF
<IfModule mod_fastcgi.c>
	AddHandler php5-fcgi .php
	Action php5-fcgi /php5-fcgi
	Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
	FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
		<Files "php5-fcgi">
			Require all granted
		</Files>
</IfModule>
EOF
apache2ctl restart


